package com.travel.controller;

import com.travel.pojo.Product;
import com.travel.service.impl.PurchaseServiceImpl;
import com.travel.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class PurchaseController {
    @Autowired
    private PurchaseServiceImpl purchaseService;
    @GetMapping("/purchase/selectAll")
    public Result getSelectAll(){
        List<Product> list = purchaseService.list();
        return new Result<>(list,"查询成功",200);
    }
}
